Skip to content

feat: add dev env#192

Merged
dermatz merged 2 commits into
mainfrom
addDevEnv
Jun 2, 2026
Merged

feat: add dev env#192
dermatz merged 2 commits into
mainfrom
addDevEnv

Conversation

@Morgy93
Copy link
Copy Markdown
Collaborator

@Morgy93 Morgy93 commented Jun 1, 2026

This pull request introduces a comprehensive DDEV-based local development environment for Magento 2, including OpenSearch support and several developer productivity tools. The changes add configuration files, Docker setup, and custom commands to streamline Magento installation, code analysis, and coding standards enforcement.

Environment setup and configuration:

  • Added .ddev/config.yaml to define the project as a Magento 2 site with PHP 8.4, MariaDB 10.6, and Nginx, specifying the Magento docroot and composer root.
  • Added .ddev/addon-metadata/ddev-opensearch/manifest.yaml to document the OpenSearch addon metadata for DDEV.
  • Added .gitattributes to exclude development and configuration files from export builds.

OpenSearch integration:

  • Added .ddev/docker-compose.opensearch.yaml to define OpenSearch and OpenSearch Dashboards services, including health checks and environment settings for local development.
  • Added .ddev/opensearch/Dockerfile to install required OpenSearch plugins (analysis-phonetic and analysis-icu).

Developer tooling and commands:

  • Added .ddev/commands/web/install-magento script to automate Magento installation, including sample data, disabling 2FA, and linking the local Mageforge module.
  • Added .ddev/commands/web/magento for running Magento CLI commands inside the container.
  • Added .ddev/commands/web/mago for running the Mago PHP analysis tool, with a check for its installation.
  • Added .ddev/commands/web/phpcs and .ddev/commands/web/phpcbf for running PHP_CodeSniffer and auto-fixing coding standards, installing dependencies if missing and supporting flexible path arguments. [1] [2]
  • Added .ddev/commands/web/phpstan for running PHPStan analysis with Magento extension, auto-installing dependencies as needed.

Copilot AI review requested due to automatic review settings June 1, 2026 17:08
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “develop branch” dev-environment wrapper for MageForge, centered around DDEV for running Magento locally and Trunk for non-PHP linting/formatting.

Changes:

  • Introduces a DDEV-based Magento + OpenSearch setup, plus helper ddev commands (install, magento CLI, phpcs/phpcbf/phpstan, mago).
  • Adds Trunk configuration (linters, runtimes, config files) and repository ignore/export rules.
  • Updates Copilot instructions to document the new dev-wrapper repo structure and workflows.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.trunkignore Excludes DDEV artefacts from Trunk scanning.
.trunk/trunk.yaml Defines Trunk CLI version, runtimes, enabled linters and actions.
.trunk/configs/.yamllint.yaml YAML lint rules configuration.
.trunk/configs/.shellcheckrc ShellCheck configuration.
.trunk/configs/.markdownlint.yaml Markdownlint config aligned with Prettier.
.trunk/configs/.hadolint.yaml Hadolint rule ignores for Dockerfile linting.
.trunk/configs/.checkov.yaml Checkov skip list.
.trunk/.gitignore Ignores Trunk-generated caches/output.
.gitignore Ignores local dev directories and keeps Trunk config tracked.
.github/copilot-instructions.md Documents dev-wrapper structure, DDEV usage, conventions, and Trunk usage.
.gitattributes Excludes dev-environment files from git archive exports.
.ddev/opensearch/Dockerfile Custom OpenSearch image for DDEV with extra plugins.
.ddev/docker-compose.opensearch.yaml DDEV compose override adding OpenSearch + Dashboards services.
.ddev/config.yaml Core DDEV project configuration (Magento docroot, PHP/DB versions, hooks).
.ddev/commands/web/phpstan Runs PHPStan in-container; installs tooling when missing.
.ddev/commands/web/phpcs Runs PHPCS in-container with Magento standard.
.ddev/commands/web/phpcbf Runs PHPCBF in-container with Magento standard.
.ddev/commands/web/mago Adds a ddev mago wrapper for PHP analysis tooling.
.ddev/commands/web/magento Adds ddev magento wrapper to run bin/magento in-container.
.ddev/commands/web/install-magento Automates installing Magento + symlinked MageForge module into the DDEV project.
.ddev/addon-metadata/ddev-opensearch/manifest.yaml Records the DDEV OpenSearch add-on metadata.

Comment thread .ddev/commands/web/magento Outdated
Comment thread .ddev/commands/web/install-magento Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .ddev/opensearch/Dockerfile Outdated
Comment thread .ddev/docker-compose.opensearch.yaml Outdated
Comment thread .ddev/commands/web/mago Outdated
Comment thread .ddev/commands/web/phpstan Outdated
@Morgy93 Morgy93 requested a review from dermatz June 1, 2026 17:38
Copilot AI review requested due to automatic review settings June 1, 2026 17:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 9 comments.

Comment thread .ddev/docker-compose.opensearch.yaml
Comment thread .ddev/commands/web/install-magento Outdated
Comment thread .ddev/commands/web/install-magento Outdated
Comment thread .ddev/commands/web/install-magento Outdated
Comment thread .ddev/commands/web/phpstan Outdated
Comment thread .ddev/commands/web/phpcs Outdated
Comment thread .ddev/commands/web/phpcbf Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Copilot AI review requested due to automatic review settings June 1, 2026 18:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 6 comments.

Comment thread .ddev/docker-compose.opensearch.yaml
Comment thread .ddev/commands/web/install-magento
Comment thread .ddev/commands/web/install-magento
Comment thread .ddev/commands/web/install-magento Outdated
Comment thread .ddev/commands/web/phpcs
Comment thread .ddev/commands/web/phpcbf
Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 1, 2026

@Morgy93 I'm unable to start working on this because of repository rules that prevent me from pushing to the branch:

  • Changes must be made through a pull request due to repository rules

See the documentation for more details.

@dermatz dermatz merged commit 2e4b5fb into main Jun 2, 2026
12 checks passed
@dermatz dermatz deleted the addDevEnv branch June 2, 2026 06:44
@github-actions github-actions Bot mentioned this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants